<!DOCTYPE html>
    <script>
	   var possibleDays = new Array(4);
	   possibleDays[0] = 31;
	   possibleDays[1] = 28;
	   possibleDays[2] = 31;
	   possibleDays[3] = 30;
	   possibleDays[4] = 31;
	   possibleDays[5] = 30;
	   possibleDays[6] = 31;
	   possibleDays[7] = 31;
	   possibleDays[8] = 30;
	   possibleDays[9] = 31;
	   possibleDays[10] = 30;
	   possibleDays[11] = 31;
	   possibleDays[12] = 29;
	   var date = new Date();
	   var i = date.getMonth();
	   if(i==1)
	   {
	      if(date.getFullYear()%4==0)
		  {
		    document.write("The current month has: " + possibleDays[12] + " days.");
		  }
	   }
	   else
		  {
		    document.write("The current month has: " + possibleDays[i] + " days.");
		  }
	   
    </script>
</html>